package br.com.vertigo.sgci.util;

import java.sql.Connection;
import java.sql.DriverManager;
 
 public class Conexao {  
	     private static Connection conn;  
	       
	     public static void conectar(String url, String usuario, String senha, String driver) {  
	         try {  
	             Class.forName(driver);  
	             conn = DriverManager.getConnection(url, usuario, senha);  
	         }  
	         catch (Exception e) {  
	             e.printStackTrace();  
	         }  
	     }  
	       
	     public static Connection getConnection() {  
	         return conn;  
	     }  
	       
	     public static void destroy() {  
	         try {  
	             conn = null;  
	         }  
	         catch (Exception e) {  
	             e.printStackTrace();  
	         }  
	     }  
	 }  
